import HttpConfig from '@/bean/HttpConfig'
import httpService from '@/common/httpService'

export const msgRecord = (params, fn1, fn2) => {
  return httpService(new HttpConfig({
    url: '/cus/msm',
    method: 'post',
    params: params,
    reminder: false,
    success: fn1,
    error: fn2
  }))
}
export const sendMsg = (params, fn1, fn2) => {
  return httpService(new HttpConfig({
    url: '/cus/sendMSM',
    method: 'post',
    params: params,
    reminder: true,
    success: fn1,
    error: fn2
  }))
}
export const lagRemind = (params, fn1, fn2) => {
  return httpService(new HttpConfig({
    url: '/cus/lag',
    method: 'post',
    params: params,
    reminder: true,
    success: fn1,
    error: fn2
  }))
}
export const accessCus = (params, fn1, fn2) => {
  return httpService(new HttpConfig({
    url: '/cus/access',
    method: 'post',
    params: params,
    reminder: true,
    success: fn1,
    error: fn2
  }))
}
export const getOrderData = (params, fn1, fn2) => {
  return httpService(new HttpConfig({
    url: '/order/getOrderData/' + params.cusOrderId,
    method: 'get',
    reminder: false,
    success: fn1,
    error: fn2
  }))
}
export const saveOrderData = (params, fn1, fn2) => {
  return httpService(new HttpConfig({
    url: '/order/saveOrderData',
    method: 'post',
    params: params,
    reminder: true,
    success: fn1,
    error: fn2
  }))
}
export const getOrderFeedback = (params, fn1, fn2) => {
  return httpService(new HttpConfig({
    url: '/order/getOrderFeedback/' + params.cusOrderId,
    method: 'get',
    reminder: false,
    success: fn1,
    error: fn2
  }))
}
export const saveOrderFeedback = (params, fn1, fn2) => {
  return httpService(new HttpConfig({
    url: '/order/saveOrderFeedback',
    method: 'post',
    params: params,
    reminder: true,
    success: fn1,
    error: fn2
  }))
}
export const delLag = (params, fn1, fn2) => {
  return httpService(new HttpConfig({
    url: '/cus/delLag/' + params.id,
    method: 'get',
    params: params,
    reminder: true,
    success: fn1,
    error: fn2
  }))
}
